/**
 * Created by HaihuaHuang on 2017/6/27.
 */

import {BaseApiMethod, BaseService} from './business.service';

class ApiMethod extends BaseApiMethod {
    getOrderList(data) {
        return this.post("GET_ORDERLIST", data);
    }

    getOrderById(data) {
        return this.post("GET_ORDERBYID","", data);
    }

    getContractList(data) {
        return this.post("GET_CONTRACTLIST", data);
    }

    getRepaymentPlan(data){
        return this.post("GET_REPAYPLANS",data);
    }
}

class CompactService {
    constructor(UtilsService) {
        this.api = new ApiMethod(UtilsService);
    }

    //进件信息
    getOrderList(data) {
        return this.api.getOrderList(data);
    }

    //根据id查进件信息
    getOrderById(data) {
        return this.api.getOrderById(data);
    }

    //查询合同信息
    getContractList(data) {
        return this.api.getContractList(data);
    }

    //查询合同还款计划
    getRepaymentPlan(data){
        return this.api.getRepaymentPlan(data);
    }
}
angular.module('biz-services').factory("CompactService", ["UtilsService", function (UtilsService) {
    return new CompactService(UtilsService);
}]);
